<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑用户</title>
<link rel="stylesheet" href="css/bootstrap.css" />
</head>
<body>
	<h1 align="center">编辑用户</h1>
	<form action="update.do" class="form-inline" role="form" method="post">
		<table class="table table-striped table-condensed">
			<tr class="active">
				<td><input type="hidden" name="user_id" value="${userBean.user_id }"></td>
			</tr>
			<tr class="success">
				<td>用户姓名:</td>
				<td><input type="text" name="user_nickname" value="${userBean.user_nickname}"></td>
			</tr>
			<tr class="warning">
				<td>用户密码:</td>
				<td><input type="password" name="user_password" value="${userBean.user_password}"></td>
			</tr>
			<tr class="danger">
				<td>电子邮箱:</td>
				<td><input type="text" name="user_email" value="${userBean.user_email}"></td>
			</tr>
			<tr>
				<td>用户性别:</td>
				<td><input type="radio" name="user_sex" value="男" ${userBean.user_sex=='男'?"checked='checked'":"" }>男 
				    <input type="radio" name="user_sex" value="女" ${userBean.user_sex=='女'?"checked='checked'":"" }>女</td>
			</tr>
			<tr>
				<td>用户地址:</td>
				<td><select size="1" name="user_address">
						<p>
							<option value="云南省大理州大理市" ${userBean.user_address=='云南省大理州大理市'?"selected='selected'":"" }>云南省大理州大理市</option>
							<option value="云南省红河州泸西县" ${userBean.user_address=='云南省红河州泸西县'?"selected='selected'":"" }>云南省红河州泸西县</option>
							<option value="云南大理大学" ${userBean.user_address=='云南大理大学'?"selected='selected'":"" }>云南大理大学</option>
							<option value="云南海文科技" ${userBean.user_address=='云南海文科技'?"selected='selected'":"" }>云南海文科技</option>
						</p>
				</select></td>
			</tr>
			
			<tr>
			
				<td>爱好:</td>
				<td>
                 <!--分割字符串 -->
				 <c:forEach var="ho" items="${fn:split(userBean.user_hobby,',')}"> 
				 		<input type="checkbox" name="user_hobby" value="打篮球" ${ho=='打篮球'?"checked='checked'":"" }>打篮球
				</c:forEach> 
				<c:forEach var="ho" items="${fn:split(userBean.user_hobby,',')}">  
				 		<input type="checkbox" name="user_hobby" value="游泳" ${ho=='游泳'?"checked='checked'":"" }>游泳
				</c:forEach> 
				<c:forEach var="ho" items="${fn:split(userBean.user_hobby,',')}">  
				 		<input type="checkbox" name="user_hobby" value="足球" ${ho=='足球'?"checked='checked'":"" }>足球
				</c:forEach>
				<br>
				<c:forEach var="ho" items="${fn:split(userBean.user_hobby,',')}">  
				 		<input type="checkbox" name="user_hobby" value="排球" ${ho=='排球'?"checked='checked'":"" }>排球
				</c:forEach> 
				<c:forEach var="ho" items="${fn:split(userBean.user_hobby,',')}">  
				 		<input type="checkbox" name="user_hobby" value="武术" ${ho=='武术'?"checked='checked'":"" }>武术
				</c:forEach> 
			   </td>
			</tr>
			<tr>
				<td align="center" colspan="2">
				    <input type="submit" class="btn btn-success" name="submit" value="提交">&nbsp;&nbsp;
					<input type="reset" class="btn btn-danger" value="重置"></td>
			</tr>
		</table>

	</form>
</body>
</html>